package cn.tedu.shoot;

import java.awt.image.BufferedImage;

/*小敌机*/
public class Airplane extends FlyingObject implements EnemyScore {

    private int speed;
    private int index = 1;

    Airplane() {
        super(48, 50);
        speed = 3;
    }

    public void step() {
        y += speed;

    }

    public BufferedImage getImage() {


        if (isLive()) {
            return Images.airs[0];

        } else if (isDead()) {
            BufferedImage img = Images.airs[index++];
            if (index == Images.airs.length) {
                stated = REMOVE;
            }
            return img;
        } else {
            return null;
        }

    }

    public int getScore() {
        return 1;
    }




}

